<template>
	<view class="state-page flex-col">
		<view class="state-icon">
			<uv-icon v-if="state==1" name="checkmark-circle-fill" color="#00ae00" size="100"></uv-icon>
			<uv-icon  v-if="state==0" name="close-circle-fill" color="red" size="100"></uv-icon>
		</view>
		<view class="state-text">
			{{state?'预约成功':'预约失败'}}
		</view>
		<view class="btn-box">
			<uv-button @click="gotoHome" color="#5ebcbc" :customStyle="{'border-radius':'20rpx'}">
			返回首页
			</uv-button>
			<uv-button @click="gotoOrder"  type="primary" :plain="true" color="#5ebcbc" :customStyle="{'border-radius':'20rpx',background:'none',marginLeft:'20rpx'}">
			查看订单
			</uv-button>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				state:1,
				orderId:null,//訂單id
				
			}
		},
		onLoad(e) {
			this.orderId=e.orderId
		},
		methods: {
			gotoHome(){
				uni.switchTab({
					url:'/pages/home/home'
				})
			},
			gotoOrder(){
				// console.log('查看订单详情')
				uni.reLaunch({
					url:'/pages/order/orderDetails?orderId='+this.orderId
				})
			}
		}
	}
</script>

<style scoped lang="less">
.state-page{
	justify-content: center;
	align-items: center;
	padding-top: 300rpx;
	.state-icon{
		margin-bottom: 44rpx;
	}
	.state-text{
		font-size: 36rpx;
			font-weight: normal;
			font-stretch: normal;
			line-height: 63rpx;
			letter-spacing: 0rpx;
			color: #333333;
			margin-bottom: 70rpx;
	}
	.btn-box{
		display: flex;
		align-items: center;
		justify-content: center;
		// justify-content: space-between;
	}
}
</style>
